package hc.bre.flow

import hc.bre.cmn.ReferRule
import hc.bre.cmn.struct.DataStructItem

@groovy.transform.CompileStatic
@groovy.transform.ToString(includeNames=true,includePackage=false)
class FlowNodeItem extends ReferRule {
	/*
	 * referId : rule id
	 * referName: ...
	 */
	String itemType //start/end/switch/task
	//data item id to variable id;
	Map<Integer, Integer> resultMap=[:];

	int positionLeft;
	int positionTop;

	@Override
	public FlowNodeItem load(Map map) {
		super.load(map);

		itemType = map['itemType'];
		
		resultMap = hc.Util.loadIntegerMap(map['resultMap'], Integer.class)

		positionLeft= map['positionLeft'] as Integer
		positionTop= map['positionTop'] as Integer
		return this;
	}
}
